import request from "@/network/require";

function getBanner(type: number) {
    return request({
        url: "/banner",
        params: {
            type: type,
        },
    });
}

function getPersonalized(limit: number, cookie?: string) {
    return request({
        url: "/personalized",
        params: {
            limit: limit,
            cookie: cookie,
        },
    });
}

function getNewAlbum(cookie?: string, limit?: number, offset?: number, area?: string) {
    return request({
        url: "/album/new",
        params: {
            cookie: cookie,
            limit: limit,
            offset: offset,
            area: area,
        },
    });
}

function getTopList(cookies?: string) {
    return request({
        url: "/toplist/detail",
        params: {
            cookies: cookies,
        },
    });
}

export {getBanner, getPersonalized, getNewAlbum,getTopList};
